/**
 * 学习目标：类组件创建state的简单写法
 */
import React from 'react';
import ReactDOM from 'react-dom';

class App extends React.Component {
  state = {
    msg: '你好！',
    list: [1, 2, 3],
  };
  render() {
    return (
      <div>
        {this.state.msg}
        <ul>
          {this.state.list.map((item) => {
            return <li key={item}>{item}</li>;
          })}
        </ul>
      </div>
    );
  }
}

ReactDOM.render(<App></App>, document.getElementById('root'));
